<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

</head>
<body>
    <!-- <ul class="nav">
        <li>我的首页</li>
        <li>产品介绍</li>
        <li>联系方式</li>

    </ul>
    <script>
        let a=document.querySelectorAll("ul li");
        console.log(a);
        for(let i=0;i<a.length;i++){
            a[i].style.color='red';
        }
        
    </script> -->

    <div class="box">我是文字的内容</div>

    <script>
        let a=document.querySelector(".box");
        a.innerHTML="我是新的内容";
    </script>
    
</body>
</html>